// vite.config.js
import {
  defineConfig,
  loadEnv
} from "file:///C:/Users/wqx09/Desktop/yuan-views/jjj_shop_multi_shop/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/wqx09/Desktop/yuan-views/jjj_shop_multi_shop/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import AutoImport from "file:///C:/Users/wqx09/Desktop/yuan-views/jjj_shop_multi_shop/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///C:/Users/wqx09/Desktop/yuan-views/jjj_shop_multi_shop/node_modules/unplugin-vue-components/dist/vite.mjs";
import {
  ElementPlusResolver
} from "file:///C:/Users/wqx09/Desktop/yuan-views/jjj_shop_multi_shop/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import path from "path";
import legacy from "file:///C:/Users/wqx09/Desktop/yuan-views/jjj_shop_multi_shop/node_modules/@vitejs/plugin-legacy/dist/index.mjs";
import viteCompression from "file:///C:/Users/wqx09/Desktop/yuan-views/jjj_shop_multi_shop/node_modules/vite-plugin-compression/dist/index.mjs";
var __vite_injected_original_dirname = "C:\\Users\\wqx09\\Desktop\\yuan-views\\jjj_shop_multi_shop";
var vite_config_default = defineConfig(({
  mode
}) => {
  const config = loadEnv(mode, "./");
  return {
    base: process.env.NODE_ENV === "production" ? "./" : "/",
    server: {
      host: "0.0.0.0",
      //ip地址
      port: 8080,
      //端口号
      open: true,
      //启动后是否自动打开浏览器
      proxy: {
        "/api": {
          target: config.VITE_BASIC_URL,
          changeOrigin: true,
          rewrite: (path2) => path2.replace(/^\/api/, "")
        }
      }
    },
    plugins: [
      viteCompression({
        verbose: true,
        disable: false,
        threshold: 10240,
        algorithm: "gzip",
        ext: ".gz"
      }),
      vue(),
      legacy({
        targets: ["ie>=11"],
        additionalLegacyPolyfills: ["regenerator-runtime/runtime"]
      }),
      AutoImport({
        resolvers: [ElementPlusResolver()]
      }),
      Components({
        resolvers: [ElementPlusResolver()]
      })
    ],
    css: {
      preprocessorOptions: {
        // 全局样式引入
        scss: {
          additionalData: '@use "./static/scss/element.scss";@use "./static/scss/main.scss";',
          javascriptEnabled: true
        }
      }
    },
    resolve: {
      alias: {
        "@": path.join(__vite_injected_original_dirname, "./src")
      }
    },
    build: {
      assetsDir: "static",
      minify: "terser",
      productionSouceMap: false,
      assetsPublicPath: "/shop/",
      rollupOptions: {
        output: {
          chunkFileNames: "static/js/[name]-[hash].js",
          entryFileNames: "static/js/[name]-[hash].js",
          assetFileNames: "static/[ext]/[name]-[hash].[ext]",
          manualChunks(id) {
            if (id.includes("node_modules")) {
              return id.toString().split("node_modules/")[1].split("/")[0].toString();
            }
          }
        }
      },
      terserOptions: {
        compress: {
          drop_console: true,
          drop_debugger: true
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFx3cXgwOVxcXFxEZXNrdG9wXFxcXHl1YW4tdmlld3NcXFxcampqX3Nob3BfbXVsdGlfc2hvcFwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiQzpcXFxcVXNlcnNcXFxcd3F4MDlcXFxcRGVza3RvcFxcXFx5dWFuLXZpZXdzXFxcXGpqal9zaG9wX211bHRpX3Nob3BcXFxcdml0ZS5jb25maWcuanNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0M6L1VzZXJzL3dxeDA5L0Rlc2t0b3AveXVhbi12aWV3cy9qampfc2hvcF9tdWx0aV9zaG9wL3ZpdGUuY29uZmlnLmpzXCI7aW1wb3J0IHtcclxuXHRkZWZpbmVDb25maWcsXHJcblx0bG9hZEVudlxyXG59IGZ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